Model Property Editor

This document describes how to use the model property editor, a separate application that allows you to edit ships. It's located in the Tools subdirectory. Before you run the application, it is recommended that you run the included registry file (modelpropertyeditor.reg). This will enter some of the preferences needed to work with Bridge Commander into the registry.


Setting up the editor

When you run the editor, the first thing you'll want to do is set up your preferences. Select Edit -> Options... to open up the Options dialog box. If you ran the included registry file, the model scale and texture path should already be set up. Change the default model directory to wherever you have Bridge Commander installed, in the 'data\models\ships' subdirectory. Then, change the default script directory to point to the 'scripts\ships\hardpoints' subdirectory where BC is installed. Warning: you should only have one file open at once in the editor.


Using the editor

Select Open from the File menu. You'll be presented with the models directory, from which you should choose a model. You'll then be asked if you want to load a script -- if you're modifying a ship, say yes, and then select its script from the dialog box. If you're starting from scratch, hit no, and you'll be left with a blank slate.

On the right hand side of the window, you'll see a tree representing the scene graph of the model. Open up the tree until you reach 'Scene Root', and select that. (The editor supports placing properties at any location in the model, but Bridge Commander expects them to all be at 'Scene Root'.) If you loaded a script, you'll probably see a list of properties fill up the left hand side of the screen. These are the properties that are actually attached to the model.


Moving around the editor

The center view can be used to examine the model. You can use the mouse to move around the view window in various ways. Normally, the mouse is in a certain "click mode", indicated in the bottom right corner of the tool bar. For example, in "pan mode", dragging with the left mouse button in the view will pan the camera around. These modes are accessible from the View menu.

Alternately, you can use the middle and right mouse buttons, along with the mouse wheel, to move directly. Right-dragging in the view will rotate the camera. Dragging with the middle button will pan the camera, and rolling up and down with the mouse wheel will move the camera forward and backward.

Here is a brief summary of what each mode in the editor does:


Creating and editing properties

In Bridge Commander, properties usually describe systems attached to the ship. All of the properties in the script are listed in the template list, which can be accessed under the Properties menu. This dialog will allow you to create new properties, edit existing ones, and move ones between the global and local lists (advanced usage -- not really necessary for editing ships). It is recommended that you use the local lists only, located on the right hand side of the dialog.

Selecting New... will let you create a new property, by choosing from some predefined types. Select the one that you want, and a name for it, and it will be added to the set you chose. You can then edit it, if you choose, by double-clicking it or selecting Edit. This will bring up a dialog box whose contents will depend on what type of property you selected.

When you are done editing the property, you still need to add it to the model for it to be recognized by the game. Close the template list, and select 'Scene Root' out of the scene graph on the right-hand-side of the main window. Then, click Add Property, on the left hand side of the window. You can then select the property to add. It will be attached to the model.


Using hardpoint scripts with Bridge Commander

When you save your hardpoint script, it should be in the "scripts/ships/Hardpoints" directory under Bridge Commander. In order to use it, you'll need a corresponding "ship script" that points to the hardpoint script. These files are located in the "scripts/ships" directory.

If you've just modified an existing ship (and didn't overwrite its hardpoint file), it's easiest to just make a copy of that ship's ship script, rename it to your new ship's name, then edit it to point to the correct hardpoint script. Copy the ship script (in "scripts/ships"), rename it, then change the "HardpointFile" entry at the top of the file to the name of your new hardpoint script (minus the .py extension).

Now, if a mission creates your ship using loadspacehelper.CreateShip(), it will use the right hardpoint file and you'll have your modified ship in the game.


Reference for specific properties

Each of the properties you can add to a model has a specific purpose. Some of them can be very complex, and inherit features from other properties, while others are fairly simple. This section will start with the properties that are basic building blocks of others, and move on to more specialized ones.

Note: The names of these properties usually correspond with the tabs that appear in the property editing dialogs.


Advanced topics

This section discusses some advanced or special-purpose things in the editor.

Parent scripts

If you're trying to create a "souped up" version of a ship, it's often easier to just modify one or two things about it, than to create a new ship. You can do this with the parent script option, located under the Property menu. You will be prompted for a script from which to inherit (i.e. "ships.Hardpoints.galaxy"). When you save the script, it will be changed so that in the game, it loads "ships.Hardpoints.galaxy" first, and then loads the inheriting script.

Properties in the inheriting script with the same name as ones in the parent script will override them. For example, if you want to create a Galaxy with a better phaser system, you would create a script "SuperGalaxy", that inherits from "ships.Hardpoints.galaxy", but contains a property named "Phaser System", which is the modified phaser system. When the script is read by the game, the "Phaser System" in SuperGalaxy will override the one from the original script.

Localization concerns

The game will look for localized versions of subsystem names when building the target menu. It looks for them in the file "data/TGL/Subsystems.tgl", so if you want localized strings for your subsystem names, place localized strings in that file.


Created on ... January 31, 2002